<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>示例5</title>
</head>
<body>
    <script>
        function Student(name,age){
            this.name = name;
            this.age = age;
            this.show = showshow;
        }

        function showshow(){
            console.log(this.name,this.age)
        }

         const stu1 = new Student('张三',18);
         const stu2 = new Student('里斯',19);
         stu1.show()
        stu2.show()
        console.log(stu1)
        console.log(stu2)
        console.log("--------------")
        console.log(stu1.constructor == Student);
        console.log(stu1 instanceof Object);
        console.log(stu1 instanceof Student);
    </script>
</body>
</html>